<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var a =prompt("班长口袋里有多少钱");
        if(a>=2000){
            alert("请大家吃西餐");
        }
        else if(500<a && a<1000){
            alert("请大家吃棒棒糖");
        }
        else if(1500<=a && a<2000){
            alert("请大家吃快餐");
        }
        else if(1000<=a && a<1500){
            alert("请大家喝饮料");
        }
        else{
            alert("班长下次把钱带够")
        }
    </script>
</body>
</html>